<template>
  <a-modal
    :width="width"
    :visible="visible"
    @ok="handleOk"
    @cancel="handleCancel"
    cancelText="关闭">
    <a-upload
      listType="picture-card"
      class="avatar-uploader"
      :showUploadList="false"
      :data="{'isup':1}">
      <img :src="getAvatarView()" alt="二维码" style="height:208px;max-width:600px"/>
    </a-upload>
  </a-modal>
</template>

<script>

    import JUpload from '@/components/jeecg/JUpload'

    export default {
        name: "HealthImgModal",
        components: {
            JUpload,
        },
        data() {
            return {
                form: this.$form.createForm(this),
                width: 280,
                visible: false,
                qrCode: '',
                url: {
                    imgerver: window._CONFIG['domianURL'] + "/sys/common/static",
                },
            }
        },
        created() {
        },
        methods: {
            getAvatarView() {
                return this.url.imgerver + this.qrCode;
            },
            edit(qrCode) {
                this.qrCode = qrCode;
                this.visible = true;
            },
            close() {
                this.$emit('close');
                this.visible = false;
            },
            handleOk() {
                this.close()
            },
            handleCancel() {
                this.close()
            },
        }
    }
</script>